<template>
  <view class="course-list">
    <vue-Card-item
      v-for="teacher in teacherList"
      :key="teacher.id"
      :item="teacher"
      type="teacher"
    ></vue-Card-item>
  </view>
</template>

<script setup lang="ts">
	import {ref} from 'vue'
	import { onLoad } from '@dcloudio/uni-app';
	import HomeApi from '@/Api/Home'
	const teacherList = ref([])
	const getIndexdata = async () => {
		const result = await HomeApi.getHomeData()
		if (result.code === 200) {
			teacherList.value = result.data.teacherList
		}
	}
	onLoad(() => {
		getIndexdata()
	})

	
</script>

<style lang="less">
	.course-list {
				display: flex;
				flex-wrap: wrap;
				justify-content: space-around;

				&:after {
					content: '';
					width: 335upx;
				}
			}
</style>